<%--
  Created by IntelliJ IDEA.
  User: 南苼
  Date: 2021/7/4
  Time: 10:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
  <script type="text/javascript" src="../js/jquery-1.10.2.js"></script>
  <link rel="stylesheet" href="../css/addedit.css">
  <script>
    $(function(){
      var but=$("button");
      $(".dv div").click(function(){
        var z=$(this).html();
        console.log(z);
        $(".dv div").css({"background-color":"white","color":"black"})
        $(this).css({"background-color":"#545B62","color":"white"});
      })
      $(".dv3 div").click(function(){
        var z=$(this).html();
        console.log(z);
        $(".dv3 div").css("background-color","white")
        $(this).css("background-color","#00FFFF");
      })
      $(but[0]).click(function(){
        var v=$(".txt2").val();
        if(v>0){
          var zhi=v-1;
          $(".txt2").val(zhi);
        }
      })
      $(but[1]).click(function(){
        var z=1;
        var z2=0;
        var v=parseFloat($(".txt2").val())+1;
        z2=z+v;
        $(".txt2").val(v);
      })
      $("#qx").click(function(){
        $(".ad").remove();
      })
    })
  </script>
</head>
<body>
<div class="ad">
  <div style="margin-left: 160px">提干: <input ttype="text" class="txt1"/></div><br/>
  <div style="margin-left: -640px;margin-top: 30px">分值: <button>-</button><input type="text" class="txt2" value="0"/><button>+</button></div>
  <div style="width: 600px;height: 30px;margin-top: 40px;margin-left: 160px">
    <div class="fd">题型:</div>
    <div class="dv">
      <div>单选</div><div>多选</div><div>填空</div>
    </div>
  </div>
  <br/>
  <div style="margin-left: 160px">
    <div>选项:</div>
    <div class="dv2">
      <div><div>A <input type="text" class="txt3"/></div><br/>
        <div>B <input type="text" class="txt3"/></div><br/>
        <div>C <input type="text" class="txt3"/></div><br/>
        <div>D <input type="text" class="txt3"/></div>
      </div>
    </div>
    <div style="margin-top: 220px;margin-left: -350px">
      <div class="fd">答案:</div>
      <div  class="dv3">
        <div>A</div><div>B</div><div>C</div><div>D</div>
      </div>
    </div>
    <br/>
    <div id="bc">保 存</div>
    <div id="qx">取消</div>
  </div>
</div>
</body>
</html>
